package com.ihr360.commons.model.meta.table;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * 动态单元格内容
 *
 * @author davidwei
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class DynamicCell implements Serializable {

    @JsonProperty(value = "v")
    private Object cellValue;

    public DynamicCell() {
    }

    public DynamicCell(int cellValue) {
        this.cellValue = cellValue;
    }
    public DynamicCell(double cellValue) {
        this.cellValue = cellValue;
    }

    public DynamicCell(String cellValue) {
        this.cellValue = cellValue;
    }

    public String getCellValue() {
        return cellValue != null ? cellValue.toString() : null;
    }

    public void setCellValue(String cellValue) {
        this.cellValue = cellValue;
    }

    public Object originValue(){
        return cellValue;
    }

}